package cn.walls1717.ggkt.live.service.impl;

import cn.walls1717.ggkt.live.mapper.LiveCourseDescriptionMapper;
import cn.walls1717.ggkt.live.service.LiveCourseDescriptionService;
import cn.walls1717.ggkt.model.live.LiveCourseDescription;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 课程简介服务实现类
 *
 * @author walls1717
 * @since 2022/07/23
 */
@Service
public class LiveCourseDescriptionServiceImpl extends ServiceImpl<LiveCourseDescriptionMapper, LiveCourseDescription> implements LiveCourseDescriptionService {

    /**
     * 根据直播课程id获取直播课程信息
     */
    @Override
    public LiveCourseDescription getLiveCourse(Long id) {
        LambdaQueryWrapper<LiveCourseDescription> lqw = new LambdaQueryWrapper<>();
        lqw.eq(LiveCourseDescription::getLiveCourseId, id);
        return this.getOne(lqw);
    }
}
